package controller;

import static org.junit.Assert.*;


import java.util.List;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

public class SessionTest {
	private static Session s;

	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
		s = new Session();
	}

	@AfterClass
	public static void tearDownAfterClass() throws Exception {
	}

	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
	}
	
	/**
	 * Author: Kim S.
	 * Date: 3/13/15
	 */
	@Test
	public void testSearchByKeyword() {
		String keyword = "woman";
		String testAnswer = "\"Global Business Logistics actively solicits diversity "
				+ "in our service providers. The spirit of these efforts is to help "
				+ "emerging firms in the industry gain a greater presence while at "
				+ "the same time adding diversity among providers.\"";
		//System.out.println(testAnswer);
		s.searchByKeyword(keyword);
		List<String> actualAnswerList = s.answers;
		String actual = "";
		for (String ans : actualAnswerList) {
			actual += ans;
		}
		
		assertTrue(testAnswer.equals(actual));
	}

	@Test
	public void testSearchByPhrase() {
		fail("Not yet implemented");
	}

	@Test
	public void testSearchByCategory() {
		fail("Not yet implemented");
	}

	@Test
	public void testSearchByPhraseCategory() {
		fail("Not yet implemented");
	}

	@Test
	public void testSearchByKeyCategory() {
		fail("Not yet implemented");
	}

	@Test
	public void testSearchAll() {
		fail("Not yet implemented");
	}

}
